package cn.quevo.cube.provide.data.service.impl;

import cn.quevo.common.entity.PageResult;
import cn.quevo.cube.provide.data.dao.CubeModelDataDetailDao;
import cn.quevo.cube.provide.data.entity.CubeModelDataDetail;
import cn.quevo.cube.provide.data.entity.query.CubeModelDataDetailQuery;
import cn.quevo.cube.provide.data.service.CubeModelDataDetailService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 数据记录明细 Service接口实现
 *
 * @author July july_sky@foxmail.com
 * @version 1.0
 * @date 2018/12/11 14:58:02
 * @Copyright 东方浩星（北京）传媒科技有限公司版权所有.All Rights Reserved.
 */
@Service("cubeModelDataDetailService")
@Transactional(transactionManager="transactionManager",rollbackFor={Exception.class})
public class CubeModelDataDetailServiceImpl implements CubeModelDataDetailService {
    @Resource(name="cubeModelDataDetailDao")
    private CubeModelDataDetailDao cubeModelDataDetailDao;

    @Override
    public Map<String,Object> getSinge(CubeModelDataDetailQuery cubeModelDataDetailQuery) {
        return this.cubeModelDataDetailDao.getSinge(cubeModelDataDetailQuery);
    }

    @Override
    public Integer create(CubeModelDataDetail cubeModelDataDetail) {
        cubeModelDataDetail.validateCreate();
        return this.cubeModelDataDetailDao.create(cubeModelDataDetail);
    }

    @Override
    public Integer update(CubeModelDataDetail cubeModelDataDetail) {
        cubeModelDataDetail.validateUpdate();
        return this.cubeModelDataDetailDao.update(cubeModelDataDetail);
    }

    @Override
    public PageResult<Map<String,Object>> getPage(CubeModelDataDetailQuery cubeModelDataDetailQuery) {
        return this.cubeModelDataDetailDao.getPage(cubeModelDataDetailQuery);
    }
}
